<div class="bg-light lter b-b wrapper-sm">
    <h1 class="m-n font-thin h4">线路报价管理</h1>
</div>
<div class="wrapper-sm">
    <uib-tabset active="6" class="tab-container" ng-init="steps={percent:20, step1:false, step2:false, step3:false, step4:false, step5:false, step6:true, step7:false, step8:false}">
        <uib-tab heading="基本信息" select="steps.percent=20" ui-sref="app.client.client_edit">
            <uib-progressbar value="steps.percent" class="progress-xs" type="success"></uib-progressbar>
        </uib-tab>
        <uib-tab heading="客户代表" select="steps.percent=35" ui-sref="app.client.customerrepresentative_manage"></uib-tab>
        <uib-tab heading="货物分类" select="steps.percent=45" ui-sref="app.client.goodstype_manage"></uib-tab>
        <uib-tab heading="货物" select="steps.percent=55" ui-sref="app.client.goods_manage"></uib-tab>
        <uib-tab heading="结算方" select="steps.percent=65" ui-sref="app.client.settleManagent"></uib-tab>
        <uib-tab heading="线路报价" index="6" active="steps.step6" select="steps.percent=75" ui-sref="app.client.lineprice_manage">
            <form name="step6" id="lineProceForm" class="form-validation form-horizontal" novalidate ng-controller="linePriceManagentController">
                <uib-progressbar value="steps.percent" class="progress-xs" type="success"></uib-progressbar>
                <div class="wrapper-sm ">
                    <div class="panel panel-default">
                        <div class="panel-heading font-bold">查询</div>
                        <div class="panel-body">
                            <label class="control-label pull-left m-l m-r">客户单位</label>
                            <div class="col-md-6 form-group m-l m-r">
                                <label class="control-label pull-left m-l m-r">{{clientName}}</label>
                            </div>
                            <div class="line  pull-in"></div>
                            <label class="control-label pull-left m-l m-r">价格状态</label>
                            <div class="col-md-2 form-group">
                                <select id="linePrice_priceState" class="form-control input-sm" name="priceState" ng-model="queryTerms.priceState" ng-options="x.value as x.text for x in priceStateDropDown">
                                    <option value="">全部</option>
                                </select>
                            </div>
                            <label class="control-label pull-left m-l m-r">起始地</label>
                            <div class="pull-left col-md-2">
                                <input id="linePrice_beginAddress" type="text" class="form-control input-sm" id="fa-searchz-begin-address" ng-model="queryTerms.beginAddress" name="begin-address" placeholder="请输入起始地">
                            </div>
                            <div class="line line-xs pull-in"></div>
                            <label class="control-label pull-left m-l m-r">货物分类</label>
                            <div class="col-md-2 form-group">
                                <select id="linePrice_goodsTypeId" class="form-control input-sm" ng-model="queryTerms.goodsTypeId" name="goodsTypeId" ng-options="x.id as x.name for x in goodsTypeDropDown">
                                    <option value="">全部</option>
                                </select>
                            </div>
                            <label class="control-label pull-left m-l m-r">目的地</label>
                            <div class="pull-left col-md-2">
                                <input id="linePrice_endAddress" type="text" class="form-control input-sm" id="fa-searchz-end-address" ng-model="queryTerms.endAddress" name="endAddress" placeholder="请输入目的地">
                            </div>
                            <button id="linePrice_query" ng-click="queryFunc()" class="btn btn-sm btn-default btn-addon m-l" ng-class="{'disabled':querying}" ng-disabled="querying">
                                <i class="fa fa-search" ng-show="!querying"></i>
                                <i class="fa fa-spinner no-bordr" ng-show="querying" ng-class="{'fa-spin':querying}"></i>
                                <span ng-show="!querying">查询</span>
                                <span ng-show="querying">查询中...</span>
                            </button>
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            线路报价列表
                        </div>
                        <div class="table-responsive">
                            <div ui-grid="gridOptions" ui-grid-pagination ui-grid-auto-resize ui-grid-resize-columns style="height:{{heightA}}px; min-height:395px;overflow-y:hidden; min-width:1000px;">
                                <div class="watermark" ng-if="!gridOptions.data.length">暂无数据</div>
                            </div>

                        </div>
                    </div>
                    <button id="linePrice_add" data-toggle="modal" data-target="#lineprice" class="pull-right-xs btn m-b-xs btn-sm btn-info btn-addon " ng-click="addLinePrice()"><i class="fa fa-plus"></i>添加</button>
                    <!-- Modal -->
                    <div class="modal fade bs-example-modal-lg" id="lineprice" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static">
                        <div class="modal-dialog modal-lg">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button id="linePrice_miss" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="myModalLabel">{{title}}</h4>
                                </div>
                                <ng-form name="lineForm" class="modal-body">
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">截止日期<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <div class="input-group input-group-sm date">
                                                <input id="dataTime" datetimepicker plugintype="datetime" name="openTime" ng-model="detail.openTime" placeholder="起始时间" class="form-control" type="text" required/>
                                                <span id="opendataTime" class="input-group-addon curpoint">
                                                    <span class="glyphicon glyphicon-calendar"></span>
                                                </span>
                                            </div>
                                        </div>
                                        <label class="control-label pull-left">至</label>
                                        <div class="col-lg-3">
                                            <div class="input-group input-group-sm date">
                                                <input id="dataTimeEnd" datetimepicker plugintype="datetime" name="closeTime" ng-model="detail.closeTime" placeholder="结束时间" class="form-control" type="text" required/>
                                                <span id="opendataTimeEnd" class="input-group-addon curpoint">
                                                    <span class="glyphicon glyphicon-calendar"></span>
                                                </span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">起始地<span class="text-danger">*</span></label>
                                        <tms-address class="col-lg-6" province="detail.startProvinceCode" city="detail.startCityCode" area="detail.startAreaCode" city-list="startCityList" area-list="startAreaList" required="true" ischecked="ischecked">
                                        </tms-address>

                                        <!--<div class="col-lg-6">
											<ng-area city-list="startCityBoxList" area-list="startAreaBoxList" province="startProvince" city="startCity" area="startArea"></ng-area>
										</div>-->
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">目的地<span class="text-danger">*</span></label>
                                        <tms-address class="col-lg-6" province="detail.endProvinceCode" city="detail.endCityCode" area="detail.endAreaCode" city-list="endCityList" area-list="endAreaList" required="true" ischecked="ischecked">
                                        </tms-address>

                                        <!--<div class="col-lg-6">
											<ng-area city-list="endCityBoxList" area-list="endAreaBoxList" province="endProvinceBox" city="endCityBox" area="endAreaBox"></ng-area>
										</div>-->
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">吨位范围<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input id="linePrice_tonnageRange" type="text" class="form-control" ng-model="detail.tonnageRange" required placeholder="请填写吨位范围" name="tonnageRange">
                                        </div>
                                        <label class="control-label">吨</label>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">运费价格<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <input id="linePrice_price" type="text" ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/" class="form-control" ng-model="detail.price" placeholder="请填写运费价格" name="realName" required>
                                        </div>
                                        <div class="col-lg-2 m-l-n-md">
                                            <select id="linePrice_priceUnit" class="form-control" ng-model="detail.priceUnit" ng-options="x.value as x.text for x in priceUnitDropDown" name="priceUnit" required>
                                                <option value="">请选择</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">货物类别<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <select id="linePrice_goodsType" name="goodsTypeId" class="form-control" ng-model="detail.goodsTypeId" ng-change="changeGoods()" ng-options="x.id as x.name for x in goodsTypeDropDown" name="goodTypeIdBox" required>
                                                <option value="">请选择</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">货物名称<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <select id="linePrice_goodsId" class="form-control" ng-model="detail.goodsId" ng-options="x.id as x.name for x in goodsNameList" name="goodsName" required>
                                                <option value="">请选择</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">装车类型<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <select id="linePrice_loadingType" class="form-control" ng-model="detail.loadingType" ng-options="x.value as x.text for x in loadingTypeDropDown" name="loodingType" required>
                                                <option value="">请选择</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">车长<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <select id="linePrice_carLength" class="form-control" ng-model="detail.carLength" ng-options="x.value as x.text for x in carLengthDropDown" name="carLength" required>
                                                <option value="">请选择</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">结算方式<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <select id="linePrice_setleWay" class="form-control" ng-model="detail.setleWay" ng-options="x.value as x.text for x in settleWayDropDown" name="setleWay" required>
                                                <option value="">请选择</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">是否含税<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <select id="linePrice_priceType" class="form-control" ng-model="detail.priceType" ng-options="x.value as x.text for x in priceTypeDropDown" name="priceType" required>
                                                <option value="">请选择</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">价格状态<span class="text-danger">*</span></label>
                                        <div class="col-lg-3">
                                            <select id="linePrice_priceStates" class="form-control" ng-model="detail.priceState" ng-options="x.value as x.text for x in priceStateDropDown" name="priceState" required>
                                                <option value="">请选择</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">公里数</label>
                                        <div class="col-lg-3">
                                            <input id="linePrice_mileage" type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control " ng-model="detail.mileage" placeholder="请填写公里数" name="mileage">
                                        </div>
                                        <label class="control-label">公里</label>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">收货单位</label>
                                        <div class="col-lg-5">
                                            <div angucomplete-alt id="settleContact" placeholder="" pause="100" selected-object="onSelectSettle" remote-api-handler="onSettleComplete" search-fields="name" title-field="name" minlength="1" input-class="form-control form-control-small" input-name="d.settleName"
                                                match-class="highlight" required>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">收货人</label>
                                        <div class="col-lg-5">
                                            <input id="linePrice_settleContact" type="tel" class="form-control " ng-model="detail.settleContact" placeholder="请填写收货人" name="settleContact">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">收货人电话</label>
                                        <div class="col-lg-5">
                                            <input id="linePrice_settlePhoneNumber" type="tel" class="form-control " ng-model="detail.settlePhoneNumber" placeholder="请填写收货人电话" name="settlePhone"  ng-pattern="/^1\d{10}$/">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">备注</label>
                                        <div class="col-lg-5">
                                            <textarea class="form-control" ng-model="detail.remarks" placeholder="请再次填写备注" name="remarks"></textarea>
                                        </div>
                                    </div>
                                </ng-form>
                                <div class="modal-footer">
                                    <button id="linePrice_dismiss" type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                    <button id="linePrice_save" type="button" class="btn btn-primary" ng-disabled="!lineForm.$valid" ng-click="detail.click()">保存</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </uib-tab>
        <uib-tab heading="工程" select="steps.percent=85" ui-sref="app.client.projectManagent"></uib-tab>
        <uib-tab heading="客户资料" select="steps.percent=100" ui-sref="app.client.clientinfo_manage"></uib-tab>
        <uib-tab heading="对账回款周期" select="steps.percent=100" ui-sref="app.client.returnPeriod"></uib-tab>
    </uib-tabset>
</div>